package cn.qn.mapper.user;

import cn.qn.dto.user.AppUserAttentionDTO;
import cn.qn.dto.user.AppUserDTO;
import cn.qn.dto.user.AppUserQueryDTO;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author: Bryant
 * @date: 2019/5/29
 * @description:
 */
@Mapper
public interface AppUserMapper {
    /**
     * 分页查询App用户
     *
     * @param query
     * @param pb
     * @return
     */
    List<AppUserDTO> pageQueryAppUsers(AppUserQueryDTO query, PageBounds pb);

    /**
     * 分页查询App用户
     *
     * @param query
     * @return
     */
    Integer pageQueryAppUsersCount(AppUserQueryDTO query);

    /**
     * 查询我关注的用户
     *
     * @param userId
     * @return
     */
    List<AppUserAttentionDTO> queryMyAttentions(@Param(value = "userId") String userId);

    /**
     * 查询3条我关注的用户
     *
     * @param userId
     * @return
     */
    List<AppUserAttentionDTO> queryMyThreeAttentions(@Param(value = "userId") String userId);
}
